1. Field of the Invention
This invention relates to a reference-point return method and, more particularly, to a reference-point return method well suited for use in effecting return to a reference point in a numerically controlled machine tool employing a digital servo-circuit, which digitally generates a velocity command to move a movable element, and an absolute position detector.
2. Description of the Related Art
In a numerically controlled machine tool, it is necessary to return a movable element to a predetermined reference point before the start of numerical control, whereby coincidence can be achieved between machine position and the present position internally of a numerical control unit.
FIG. 4 is a block diagram of part of an apparatus for practicing a reference-point return method according to the prior art, and FIG. 5 is the associated time chart.
If a move command is given as NC data in a case where a reference-point return command ZRN is "0", a numerical control unit 11 computes a minute traveling distance, at a predetermined time interval, to be traversed along each axis during the time interval, and applies this minute traveling distance to a pulse distributor 12 for each axis at the abovementioned time interval until a destination is reached. Based on the minute traveling distance inputted thereto, the pulse distributor 12 performs a pulse distribution calculation to generate command pulses Pc. An error counter 13 constituted by a reversible counter counts the command pulses P.sub.c, and a DA converter (not shown) applies a voltage proportional to the count of the error counter 13 to a velocity controller 14 as a velocity command, thereby rotating a servomotor 15 to transport a movable element such as a tool or table, not shown.
A rotary encoder 16 is rotated by the rotation of the servomotor. The rotary encoder 16 is adapted to generate a single feedback pulse P.sub.F whenever it rotates by a predetermined amount and to generate a one-revolution signal whenever it makes one full revolution. Accordingly, the amount of rotation of the servomotor is detected by the rotary encoder 16 and is input to the error counter 13 as the feedback pulses P.sub.F, thereby diminishing the count of the error counter 13 in the zero direction. When a steady state prevails, the data (error) in the error counter 13 becomes substantially constant and the servomotor 15 rotates at a substantially constant velocity. When the command pulses stop arriving and the number of feedback pulses P.sub.F generated becomes equal to the number of command pulses, the data in the error counter 13 becomes zero and the servomotor 15 stops rotating.
When the reference-point return command ZRN is "1", on the other hand, the numerical control unit 11 calculates a minute traveling distance every predetermined time period along each axis for transporting the movable element at a rapid-traverse velocity, and inputs these distances to the pulse distributor 12, whereby the movable element is transported just as described above. It should be noted that the actual velocity V.sub.a at this time gradually rises to the rapid-traverse velocity V.sub.R, as shown in FIG. 5.
A gate 17 is open at the start of reference-point return. Therefore, the command pulses P.sub.C and the feedback pulses P.sub.F are input to a reference counter 18, just as to the error counter 13. The reference counter 18 is constituted by a reversible counter and has a capacity N (equivalent to the number of feedback pulses PF generated during one revolution of the rotary encoder). The contents REF of the reference counter 18 agrees with the contents (error) E of the error counter 13.
When the actual velocity V.sub.a exceeds a predetermined first reference velocity VR.sub.1, the numerical control unit 11 generates a control signal D0.sub.1. After the control signal D0.sub.1 is generated, a gate control circuit 19 closes the gate 17 in response to the generation of the first one-revolution signal RTS. Thereafter, the reference counter 18 counts up only command pulses P.sub.C, so that the content REF thereof varies as shown in FIG. 5. A servo delay (=E) at time T0 is set in the reference counter 18, after which the command pulses PC are counted. Therefore, the content REF can be regarded as a command position reset whenever the capacity N is reached. The actual machine position is indicated by the one-dot chain line in FIG. 5.
When the movable element travels and depresses a deceleration limit switch provided in the vicinity of the reference point, a deceleration signal DEC assumes a low level (="0"). As a result, the numerical control unit 11 executes processing in such a manner that the traveling velocity of the movable element is slowed down to a second reference velocity VR.sub.2 (at time T1), after which the movable element is moved at the velocity VR2.
As the movable element travels further at the low velocity and the deceleration limit switch is restored (time T2), the numerical control unit 11 generates a gate signal D0.sub.2.
When a predetermined command pulse P.sub.C is subsequently generated, the movable element travels further and the counted value REF in the reference counter 18 becomes zero. As a result, the signal ZR becomes "1" (T3), whereupon the gate 20 closes and the command pulses P.sub.C are no longer delivered.
Thereafter, the count in error counter 13 gradually diminishes, as a result of which the rotational velocity of the servomotor 15 decreases. The count E in error counter 13 finally comes to rest at zero when the one-revolution signal RTS is generated.
In accordance with this conventional reference-point return method, the return to the reference point can be performed accurately independently of the amount of delay. In addition, if a one-revolution position is referred to as a grid point, the movable element can be reference-point returned to the first grid point after the deceleration limit switch is restored. Moreover, by presetting a numerical value M in the reference counter 18, a position displayed M pulses from the grid position can be made the reference point-return position. Thus, the conventional method is a useful one.
There has been a recent trend toward digital control of servomotors. With such a digital servo, a traveling distance .DELTA.R.sub.n to be traveled along each axis every predetermined time .DELTA.T (e.g., 2 msec) is calculated by a numerical control unit, a value obtained by multiplying the traveling distance .DELTA.R.sub.n by a predetermined gain is inputted to a digital servo-circuit every predetermined time .DELTA.T, and the digital servo-circuit performs a calculation in accordance with the following equation every .DELTA.T: EQU E+.DELTA.R.sub.n -.DELTA.P.sub.n .fwdarw.E
(where .DELTA.P.sub.n is the actual traveling velocity every .DELTA.T and E a cumulative error whose initial value is zero) and executes pulse-width modulation in accordance with the size of the error E, thereby controlling the servomotor.
In other words, in the case of a digital servo, the pulse distributor 12 which generates the serial pulses is not provided, and the error counter is substituted by a RAM in the numerical control unit 11.
A problem which results is that the conventional reference-point return method cannot be applied to reference-point return of a numerically controlled machine employing such a digital servo.
Accordingly, the applicant has proposed, as Japanese Patent Application No. 61-034880 (filed on Feb. 19, 1987 and entitled "Reference-Point Return Method", for which the corresponding U.S. Patent is U.S. Pat. No. 4,782,275), a reference-point return method applicable to reference-point return in a machine tool employing a digital servo.
In this proposed reference-point return method, an incremental pulse generated whenever a motor rotates through a predetermined angle and a one-revolution signal generated whenever the motor makes one revolution are essential requisites.
Recently, machine tools have come to employ an absolute position detector composed of a pulse coder which outputs absolute position within one revolution of a motor whenever the motor rotates through a predetermined angle, and a counter for counting the number of revolutions of the motor in dependence upon the direction of rotation using the absolute position within one revolution generated by the pulse coder, and storing the absolute position of the machine based on the number of motor revolutions and the absolute position within one revolution. The counter continues storing the absolute position of the machine even when power is cut off. The capacity of the counter is a number of pulses N generated by the pulse coder per one revolution of the motor.
Though such an absolute position detector outputs absolute position within one revolution of the motor, it is not adapted to produce the incremental pulses and the one-revolution signal.
As a consequence, a problem which arises with the proposed reference-point return method is that it cannot be applied to reference-point return in a machine tool equipped with the absolute position detector.
Accordingly, an object of the present invention is to provide a reference-point return method applicable to a numerically controlled machine tool which employs a digital servo-circuit and an absolute position detector.